Make it possible to hide custom titlebars
authorMatthias Clasen <mclasen@redhat.com>
Mon, 30 Sep 2013 23:26:07 +0000 (19:26 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 1 Oct 2013 00:19:08 +0000 (20:19 -0400)
Previously, we were showing and hiding the custom titlebar
widget in response to state changes such as maximization.
Instead, use gtk_widget_set_child_visible() and leave
show/hide to applications. This makes it possible to set
a custom titlebar and hide it, for a titlebar-less appearance.

https://bugzilla.gnome.org/show_bug.cgi?id=707132

gtk/gtkwindow.c

index e10500d1d57cc30c60f1256f1a382d8587d9b4c0..ba685c0a09634591c22a7b35c23a61a4d5bbe966 100644 (file)
@@ -5141,12 +5141,12 @@ update_window_buttons (GtkWindow *window)
   if (priv->fullscreen ||
       (maximized && priv->hide_titlebar_when_maximized))
     {
-      gtk_widget_hide (priv->title_box);
+      gtk_widget_set_child_visible (priv->title_box, FALSE);
       return;
     }
   else
     {
-      gtk_widget_show (priv->title_box);
+      gtk_widget_set_child_visible (priv->title_box, TRUE);
     }
 
   if (priv->titlebar == NULL)